package cloudbus

import (
	"reflect"

	"zstackgo/pkg/header/message"
	"zstackgo/spring"
)

func init() {
	spring.RegisterInterface("core.cloudbus.MarshalReplyMessageExtensionPoint", reflect.TypeOf((*MarshalReplyMessageExtensionPoint)(nil)).Elem())
}

type MarshalReplyMessageExtensionPoint interface {
	GetReplyMessageClassForMarshalExtensionPoint() []*reflect.Type
	// When "replyOrEvent" is an event, then the second argument "msg" will be null.
	MarshalReplyMessageBeforeSending(replyOrEvent message.Message, msg message.NeedReplyMessage)
	MarshalReplyMessageBeforeDropping(replyOrEvent message.Message, msg message.NeedReplyMessage)
}
